<include file="Common:lefter" />
<div class="content-box">
    <div class="content-box-header">
    <h3>文章列表</h3>
    </div>
    <div class="content-box-content">
    <div class="tab-content default-tab">
      <table>
        <thead>
          <tr>
            <td colspan="9">
              <form>
              <div class="bulk-actions">
                <select name="typeId">
                  <option value="-1">选择分类</option>
                  <option value="0">默认分类</option>
		          <foreach name="typeList" item="tl">
		          <if condition="$tl.type_id eq $typeId">
		          <option value="{$tl.type_id}" selected="selected">{$tl.type_name}</option>
		          <else/>
		          <option value="{$tl.type_id}">{$tl.type_name}</option>
		          </if>
		          </foreach>
                </select>
                置顶：
                <select name="is_top">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
                推荐：
                <select name="is_recommend">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
                标题关键字：
                <input class="text-input" type="text" name="small-input">
                <a class="button" href="#">搜索</a> </div>
              </form>
              <div class="clear"></div>
            </td>
          </tr>
          <tr>
            <th width="60">
              <input class="check-all" type="checkbox" />
            </th>
            <th width="">标题</th>
            <th width="100">分类</th>
            <th width="100">浏览权限</th>
            <th width="50">置顶</th>
            <th width="50">推荐</th>
            <th width="120">发布时间</th>
            <th width="50">排序</th>
            <th width="80">操作</th>
          </tr>
        </thead>
        <tfoot>
          <tr>
            <td colspan="9">
              <div class="bulk-actions align-left">
                <select name="dropdown">
                  <option value="option1">批量操作</option>
                  <option value="option2">删除</option>
                </select>
                <a class="button" href="#">应用</a> </div>
              <div class="pagination">
              {$page}
              </div>
              <!-- End .pagination -->
              <div class="clear"></div>
            </td>
          </tr>
        </tfoot>
        <tbody>
        <foreach name="list" item="article">
          <tr>
            <td>
              <input type="checkbox" />{$article.article_id}
            </td>
            <td><a href="__APP__/Article/edit/articleId/{$article.article_id}?&p={$nowPage}" title="{$article.title}">{$article.title}</a></td>
            <td><if condition="$article.type_id eq 0">默认分类<else/>{$article['type_info'].type_name}</if></td>
            <td><if condition="$article.visibility eq 1">所有人可见<else/>仅自己可见</if></td>
            <td><if condition="$article.is_top eq 1"><font color="#FF6600">是</font><else/>否</if></td>
            <td><if condition="$article.is_recommend eq 1"><font color="#FF6600">是</font><else/>否</if></td>
            <td>{$article.create_time}</td>
            <td>{$article.sort}</td>
            <td>
            <a href="__APP__/Article/edit/articleId/{$article.article_id}?&p={$nowPage}" title="编辑"><img src="__ROOT__/Public/Image/Admin/icons/pencil.png" alt="编辑" /></a>
            <a href="__APP__/Article/set/articleId/{$article.article_id}?&p={$nowPage}" title="设置"><img src="__ROOT__/Public/Image/Admin/icons/hammer_screwdriver.png" alt="设置" /></a>
            <a href="javascript:void(0);" onclick="deleteArticle({$article.article_id});" title="删除"><img src="__ROOT__/Public/Image/Admin/icons/cross.png" alt="删除" /></a>
            </td>
          </tr>
        </foreach>
        </tbody>
      </table>
    </div>
    </div>
    </div>
<include file="Common:footer" />
<script type="text/javascript">
function deleteArticle(articleId){
	if(confirm('确定删除吗？')){
		location.href = '__APP__/Article/delete/articleId/'+articleId+'?&p={$nowPage}';
	}
}
</script>